Hi
You are mixing old syntax with lambda which it cannot do.
With lambdas you cannot use the SIGNAL() macro.
Has to be the new syntax.
I used
QObject::connect(&but_submit, &QPushButton::clicked, [&]() {...which compiled fine and did show the entered string.
But you seems to be using
Qt-4.8.5 at and new syntax first came in Qt5
so i guess that is why you get errors.
So basically, with that old Qt , you cannot do it in main.
You need a QOBJECT based object to send signals to.
In that old Qt, its not possible to connect to functions.
Only to member slots in a class.
You must use that so old Qt ?